I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad 5 8214 ch***********@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Thanks for the help!
Chad ch***********@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>chad.a.mor...@gmail.com wrote:
>>I don't have a lot of experience using $_GET. I need to know how to pass characters in using the $_GET method. The character I'm having a problem with right now is '#', but I'm sure there are others. Could anyone give me a list of characters that need to be escaped using $_GET, and then also how to use them? Also, could you tell me if any characters simply are not allowed in a get? Example: getData.php?type=edit&user=myName&item=Item#1 Thanks, Chad
urlencode() your parameters.
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Thanks for the help!
Chad
Chad,
First of all, it's urlencode() - not encodeURI(). I have no idea what
that function does - it's not part of the PHP standard library.
And you're using AJAX - which is something completely different. Not
being an AJAX user myself, I can't say what your problem is. All I know
is I use urlencode() with some regularity and it works fine. I've also
tried strings with a '#' in them and it's OK.
The '#' is used in an href to indicate a tag (<a name=...>) on a page.
Perhaps AJAX is getting confused. I wouldn't know. Or maybe your
encodeURI() function isn't doing the same thing.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
================== ch***********@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Indeed.
encodeURI leaves ; / ? : @ & = + $ , # all intact.
What you need in Javascript is escape(), not encodeURI().
Tip: Buy a good JS book and you never fall for this kind of thing again.
I recommend Javascript, the definitive guide, by Flanagan (O Reilly)
Regards,
Erwin Moller
>
Chad
On Mar 20, 11:20 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
chad.a.mor...@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Indeed.
encodeURI leaves ; / ? : @ & = + $ , # all intact.
What you need in Javascript is escape(), not encodeURI().
Tip: Buy a good JS book and you never fall for this kind of thing again.
I recommend Javascript, the definitive guide, by Flanagan (O Reilly)
Regards,
Erwin Moller
Chad- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Thanks for the help Erwin and Jerry. I will definitely check out the
book you mentioned. I'm finding that the more in depth that I go, the
better off I'd be with a book.
THANKS!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: BTnews |
last post by:
Hi,
Can anyone here point me at a definitive guide or tutorial about using
escape characters when building SQL queries from user entered data?
I'm especially interested in info on this in regard...
|
by: teachtiro |
last post by:
Hi,
'C' says \ is the escape character to be used when characters are
to be interpreted in an uncommon sense, e.g. \t usage in printf(),
but for printing % through printf(), i have read that %%...
|
by: Steve Litvack |
last post by:
Hello,
I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:
<?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
|
by: Guadala Harry |
last post by:
I need to place the following into a string... How can I properly escape the
% " / < and > characters?
<table width="100%" border="0" cellspacing="0" cellpadding="4px"
class="hfAll"></Table>
...
|
by: Guadala Harry |
last post by:
I'd like to know the answer to the following question so I can know what to
expect with regard to other similar uses of escape characters and strings.
While everything works fine - I'd like to know...
|
by: Mike Cooper |
last post by:
Hi everyone,
I am accessing several binary (PCL) files sequentially using a for
loop. For each file I am using the fileget() command to populate the
contents of the file into a string. I use...
|
by: Jim Carlock |
last post by:
Does PHP provide a function to extract the rightmost characters
from a string?
For example, the VB/ASP equivalent...
sStateAbbr = Right$(sCityState, 2)
Thanks.
Jim Carlock
|
by: pkaeowic |
last post by:
I am having a problem with the "escape" character \e. This code is in my
Windows form KeyPress event. The compiler gives me "unrecognized escape
sequence" even though this is documented in MSDN....
|
by: Lawrence D'Oliveiro |
last post by:
The "escape" function in the "cgi" module escapes characters with special
meanings in HTML. The ones that need escaping are '<', '&' and '"'.
However, cgi.escape only escapes the quote character if...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |